package com.fudan.gamestore.service;

import com.fudan.gamestore.pojo.Game;
import com.github.pagehelper.PageInfo;

import java.util.List;

public interface GameService {
    List<Game> getAllGame();

    List<Game> getOwnGameByUserId(Integer userId);

    Integer addOwnGame(Integer userId, List<Integer> gameIdList);

    Integer addGameSaleCount(List<Integer> gameIdList);

    PageInfo<Game> getAllGameByPage(Integer size, Integer pageNum);

    PageInfo<Game> getOwnGameByUserIdPage(Integer userId, Integer size, Integer pageNum);

    Game getGameById(Integer gameId);

    Integer addGame(Game game);

    Integer deleteGame(Integer gameId);

    /**
     * 更改游戏信息
     *
     * @param game 游戏对象
     * @return 成功时返回1，失败时返回0
     */
    Integer modifyGame(Game game);
}
